In virtual machine environments, a hypervisor running on a host hardware system creates a virtual system on which a guest operating system may execute. The virtual system includes a virtual storage volume on which the guest operating system stores its data. For example, the hypervisor may simulate a hard disk for the guest operating system that the hypervisor stores as a virtual disk file on the host system. The hypervisor may keep track of information necessary to execute the guest operating system and store that information by adding it to the end of the virtual disk file as metadata.
Storing metadata in this way makes the virtual disk file larger by the size of the metadata. However, the indicated size of the metadata will remain the size of the virtual disk file without the metadata. This variation in file size causes an issue where only the hypervisor or other programs designed to access the metadata of the hypervisor, such as programs produced by the same developer that produced the hypervisor, are able to perform actions on the virtual disk file.
Overview
Embodiments disclosed herein provide systems and method for storing metadata to unused portions of a virtual disk file. In a particular embodiment, a method provides selecting a virtual disk file stored on a data storage volume and identifying unused portions of the virtual disk file. The method further provides writing metadata for the virtual disk file in the unused portions of the virtual disk file.
In some embodiments, after writing the metadata, the method further comprises storing the virtual disk file in a second data storage volume.
In some embodiments, identifying the unused portions of the virtual disk file comprises analyzing a bitmap of the data storage volume.
In some embodiments, identifying the unused portions of the virtual disk file stops once enough unused portions have been identified to hold all of the metadata.
In some embodiments, the unused portions of the virtual disk file comprise unallocated blocks of data that comprise the virtual disk file.
In some embodiments, wherein the virtual disk file is a Virtual Machine Disk (VMDK) file format.
In another embodiment a data management system is provided for storing metadata to unused portions of a virtual disk file. The system comprises a data storage volume configured to store virtual disk files. The system further includes a processor configured to select a virtual disk file stored on the data storage volume, identify unused portions of the virtual disk file and write metadata for the virtual disk file in the unused portions of the virtual disk file.
In some embodiments, the system includes a second data storage volume configured to store the virtual disk file after the metadata is written.
In some embodiments, the processor is configured to identify the unused portions of the virtual disk file by analyzing a bitmap of the data storage volume.
In some embodiments, the processor is configured to stop identifying the unused portions of the virtual disk file once enough unused portions have been identified to hold all of the metadata.
In some embodiments, the unused portions of the virtual disk file comprise unallocated blocks of data that comprise the virtual disk file.
In some embodiments, the virtual disk file is a Virtual Machine Disk (VMDK) file format.
In another embodiment, a computer readable medium having instructions stored thereon for operating a data management system is provided for storing metadata to unused portions of a virtual disk file. The instructions, when executed by the data management system, instruct the data management system to select a virtual disk file stored on a data storage volume and identify unused portions of the virtual disk file. The instructions further direct the data management system to write metadata for the virtual disk file in the unused portions of the virtual disk file.
In some embodiments, the instructions further direct the data management system to store the virtual disk file in a second data storage volume after the metadata is written.
In some embodiments, the instructions further direct the data management system to identify the unused portions of the virtual disk file by analyzing a bitmap of the data storage volume.
In some embodiments, the instructions further direct the data management system to stop identifying the unused portions of the virtual disk file once enough unused portions have been identified to hold all of the metadata.
In some embodiments, the unused portions of the virtual disk file comprise unallocated blocks of data that comprise the virtual disk file.
In some embodiments, the virtual disk file is a Virtual Machine Disk (VMDK) file format.